{% extends "base.html" %}

{% block bodycontent %}
    <div id="mainbody">
        <div class="info">
            <figure><img src="{{ img_url }}" alt="Panama Hat">
                <figcaption><strong>Intersing</strong>{{ daoyu }}</figcaption>
            </figure>
            <div class="card">
                <h1>About Me</h1>
                <p>网名：{{ userinfo.nickname }}</p>
                <p>职业：{{ userinfo.work }}</p>
                <p>公司：{{ userinfo.company }}</p>
                <p>Email：{{ userinfo.email }}</p>
                <ul class="linkmore">
                    <li><a class="talk" title="给我留言"></a></li>
                    <li><a class="address" title="联系地址"></a></li>
                    <li><a class="email" title="给我写信"></a></li>
                    <li><a class="photos" title="生活照片"></a></li>
                </ul>
            </div>
        </div>
        <!--info end-->
        <div class="blank"></div>
        <div class="blogs">
            <ul class="bloglist">
                {% for content in blog_body %}
                    <li>
                        <div class="arrow_box">
                            <div class="ti"></div>
                            <!--三角形-->
                            <div class="ci"></div>
                            <!--圆形-->
                            <h2 class="title"><a href="{% url 'article' content.id %}">{{ content.blog_title }}</a></h2>
                            <ul class="textinfo">
                                <a><img src="{{ content.blog_imgurl }}"></a>
                                <p> {{ content.blog_abstract|safe |slice:":50" }}</p>
                            </ul>
                            <ul class="details">
                                <li class="likes"><a>{{ content.blog_clicknum }}</a></li>
                                <li class="comments"><a>{{ content.blog_like }}</a></li>
                                <li class="icon-time"><a>{{ content.blog_timestamp }}</a></li>
                            </ul>
                        </div>
                        <!--arrow_box end-->
                    </li>
                {% endfor %}
            </ul>
            <!--bloglist end-->
            <aside>
                <div class="tuijian">
                    <h2>推荐文章</h2>
                    <ol>
                        {% for title in like_rank %}
                            <li><span><strong>{{ forloop.counter }}</strong></span><a
                                    href="{% url 'article' title.id %}">{{ title.blog_title }}</a></li>
                        {% endfor %}

                    </ol>
                </div>

                <div class="clicks">
                    <h2>热门点击</h2>
                    <ol>

                        {% for foo in hot_rank %}
                            <li><span><a href="{% url 'article' foo.id %}">{{ foo.blog_type }}</a></span><a
                                    href="{% url 'article' foo.id %}">{{ foo.blog_title }}</a></li>
                        {% endfor %}

                    </ol>
                </div>

                <div class="search">
                    <form class="searchform" method="post" action="/search">
                        {% csrf_token %}
                        <input type="text" name="keywords" value="输入文章标题搜索" onfocus="this.value=''"
                               onblur="this.value='输入文章标题搜索'">
                    </form>
                </div>

            </aside>
        </div>
        <!--blogs end-->
    </div>
{% endblock bodycontent %}